<tr>
<?php
foreach ($config as $el => $val) {
	?><td><?php
	
	if (isset($val['mapAction'])) {
		
		$map = $val['mapAction'];
		
		$params = [];
		
		foreach ($map['fieldsParams'] as $key => $val) {
			$params[$key] = (string) $entity->$val;
		}
		
		echo $this->action($map['action'], $params, 
			isset($map['view']) ? $map['view'] : '');
	} else {
		
		if (isset($val['format'])) {
			echo date($val['format'], $entity->$val['field']);
		} else {
			echo $entity->$val['field'];
		}
	}
	
	?></td><?php
}
?>
<td class="crud-action-buttons">
	<?php echo $this->action($baseAction.'.edit.button', ['id'=>(string)$entity], null)?> 
	<?php echo $this->action($baseAction.'.delete.button', ['id'=>(string)$entity], null)?>
</td>
</tr>

